//
//  UILabel+Extension.m
//  Project
//
//  Created by 冯东辉 on 2018/9/12.
//  Copyright © 2018年 FengDongHui. All rights reserved.
//

#import "UILabel+Extension.h"

@implementation UILabel (Extension)

-(CGSize)getLabelSize:(CGSize)size {
    
    CGRect rect = ([self.text boundingRectWithSize:size
                                           options:NSStringDrawingUsesLineFragmentOrigin
                                        attributes:[NSDictionary dictionaryWithObjectsAndKeys:self.font,NSFontAttributeName, nil]
                                           context:nil]);
    return rect.size;
}


CGSize  creatSize(float w,float h) {
    
    return CGSizeMake(w, h);
}


@end
